let {log} = require("./message_shema.js");
let {user} = require("../login/sign_schma.js");
module.exports = {
    // eslint-disable-next-line no-unused-vars
    logFun:function(req,res,err){ 
        console.log(req.body,123);
        user.find({user:req.body.user}).then((data)=>{
            let datas = data[0];
            let userName = datas.userName;
            let limit = datas.limit;
            let createTime = req.body.createTime;
            let user = req.body.user;
            let type = req.body.type;
            log.create({
                userName,
                limit,
                createTime,
                user,
                type
            }).then(()=>{
                res.send(true)
            })
        })
    }
}